UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eX6QnNDq4KRvcKE9ORJZac4QdbM1Joz3NlU3b/waqqM='
WHERE
key_id = '68ec2f292bc576a8ce0e786683733d55d1f17eb5445bd2e6249bbe0ce582abd9'
AND (
token = 'eX6QnNDq4KRvcKE9ORJZac4QdbM1Joz3NlU3b/waqqM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)