UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FUWkqd0k59wNpSUFBRcu/44q03zka5TZyiftln/c+xQ='
WHERE
key_id = 'b0c3133377b3d52244ddf577421d260d58cc5ab56ad3ec862b2c9093c3023ba7'
AND (
token = 'FUWkqd0k59wNpSUFBRcu/44q03zka5TZyiftln/c+xQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)