UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm+1PDNF7EjXW4QxLVsCsJCObbgsOtKxLnwtq8ZeeQiI='
WHERE
key_id = '63f57f7228ccb0558af99ed01cd8868bbafe3f97e74a17186d9a37b17c79a323'
AND (
token = 'm+1PDNF7EjXW4QxLVsCsJCObbgsOtKxLnwtq8ZeeQiI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)