UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kJvuk5m9/8SpxumHtJoir6obvcQH07TMcHL3Qjcq2sE='
WHERE
key_id = '6570f29f8e29acd829b867a46e9786965289e10863ae1b7ca56322dcd5f73aa7'
AND (
token = 'kJvuk5m9/8SpxumHtJoir6obvcQH07TMcHL3Qjcq2sE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)