UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PHLWIQWsHmOWVfPkwtMfGXZKfiXr+t9q6oTm6eO3Vz4='
WHERE
key_id = '08285f39d1cd7e7a67b51705187718fe1a3ac1b4c3458c3a6684dd3b8634bab6'
AND (
token = 'PHLWIQWsHmOWVfPkwtMfGXZKfiXr+t9q6oTm6eO3Vz4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)