UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6YUm5S1F0kcSXOOYTkUn9ZFZ4LI/8FOPrEaMwXNe3yM='
WHERE
key_id = 'ebf80dc6859c0966ec129449134517c35bfc7231f50a2864a54b2bdc6db178fa'
AND (
token = '6YUm5S1F0kcSXOOYTkUn9ZFZ4LI/8FOPrEaMwXNe3yM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)