UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+E3E/MnQmjQJLMeJhHsG/GhlDQm2GWvurgn4bB9pG7g='
WHERE
key_id = '400087844b606f536258a808a8401edff93be9d058c49d61c3389e4e86429e98'
AND (
token = '+E3E/MnQmjQJLMeJhHsG/GhlDQm2GWvurgn4bB9pG7g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)