UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'j2Cu0cdIpGt8I3dAnb7Wc5/yLO1sm7sZI4Ma1ErVDd4='
WHERE
key_id = '0bdc5ea437e76e3a142f756d535a11f73e9d837560ce90e68bba4a0e305d1229'
AND (
token = 'j2Cu0cdIpGt8I3dAnb7Wc5/yLO1sm7sZI4Ma1ErVDd4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)