UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'J/V//QX7hebi9O2ZVOKnIy7f4hh3LPbiB18JiBnCF9Y='
WHERE
key_id = '2190d566e5c8a04aacb24c15a2d1302e0e2ee0f17639db7eb5351e36471c6c1a'
AND (
token = 'J/V//QX7hebi9O2ZVOKnIy7f4hh3LPbiB18JiBnCF9Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)