UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'C+CkyZ+9f/9Ou4om4TxhkB9QBJyGcvxIOxkFB/ByD6w='
WHERE
key_id = '431cfaecf7b3ed39258ae6ab5af7e9419c30507c2404fef0c99f755fb76998ea'
AND (
token = 'C+CkyZ+9f/9Ou4om4TxhkB9QBJyGcvxIOxkFB/ByD6w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)