UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'e/2xuU2cxfLszT8kp5RyXc85FLkI9HGeG+54S/622Dw='
WHERE
key_id = '0bd3efbedd8a20f28bdbc01beb472fe5a58810e0d5e843775add16471be8d586'
AND (
token = 'e/2xuU2cxfLszT8kp5RyXc85FLkI9HGeG+54S/622Dw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)