UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Qq/+jb4FUSUJW6izsTRTgOsHoWAa9bYrFxV3s2Ixylw='
WHERE
key_id = 'b0d18005a584476d222fc68bfbafab4dc2089f24529ff9831d93254e26f33ff5'
AND (
token = 'Qq/+jb4FUSUJW6izsTRTgOsHoWAa9bYrFxV3s2Ixylw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)