UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rEVyUtgE/oulaQ8zogRJEayXUPPKHKrsrShoIsT5aXg='
WHERE
key_id = '8eee60d995362177ab6fde183ae27caa5c9a27dbe163100a60cfd653026d9e53'
AND (
token = 'rEVyUtgE/oulaQ8zogRJEayXUPPKHKrsrShoIsT5aXg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)