UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fhyYpdTmeQrjvC9z/dsNShrzuJppVcKKUy4kqRIvIrg='
WHERE
key_id = 'dcece8ebebf0340f5cbb00c153e2e72b26535327ee86ecad25ca1a67d3d26e7a'
AND (
token = 'fhyYpdTmeQrjvC9z/dsNShrzuJppVcKKUy4kqRIvIrg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)