UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nIm688Wiw9O0S4TsuiEuHoyVELMcPTqzZgMZ/+W0+gA='
WHERE
key_id = '1d8d1a94b864f84afd8bb1450d062b6afbb50a6f3a94a745a9e87a07647e1396'
AND (
token = 'nIm688Wiw9O0S4TsuiEuHoyVELMcPTqzZgMZ/+W0+gA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)