UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EkzhjEqJ2aEvyYsTHShYsmvdDN96wxnCT/fOkfcYQno='
WHERE
key_id = 'f934cde790e74a13bf334fd73f4dd3f66f6e2bc29e4a614bd50c6020c88b8b46'
AND (
token = 'EkzhjEqJ2aEvyYsTHShYsmvdDN96wxnCT/fOkfcYQno='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)