UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YajiCjP84cnlPx8p0oa5iHc8ek8+ND6xRVCs1C/B3BM='
WHERE
key_id = '4433bc9b9468b08fd20b0a45b0ff435273fcf12d8fd5b3d8802245dc2afb8297'
AND (
token = 'YajiCjP84cnlPx8p0oa5iHc8ek8+ND6xRVCs1C/B3BM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)