UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hWszwdNZsYDiMG9GIxK6N5TbaUp858y9QkZIzmZz7DE='
WHERE
key_id = '88115de2aeac677ecd115d40a9f58a70d1ed4783a2a30998f48b81c40e207958'
AND (
token = 'hWszwdNZsYDiMG9GIxK6N5TbaUp858y9QkZIzmZz7DE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)