UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BCMcxkuA3Eh9lLodwu/pc9HAqApVx8fnMmZNFf/PAxU='
WHERE
key_id = '32eb88ed28c36efe6a1b1580ab913778b266f062bde2c7fee97ccda899c83395'
AND (
token = 'BCMcxkuA3Eh9lLodwu/pc9HAqApVx8fnMmZNFf/PAxU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)