UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mCe5z6oi+pKCmftfROBpcZqa/KmU0QrnLJNpPlFP47o='
WHERE
key_id = '91c4a0cf12842200e6852884faddf7a4d45afd4bf41ef099b665fd1e2ea8e98d'
AND (
token = 'mCe5z6oi+pKCmftfROBpcZqa/KmU0QrnLJNpPlFP47o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)