UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xtxXhiVbtPmvpyn7t04q6qR/b2wsE+FlSj1bBA/NCiI='
WHERE
key_id = 'f4b57cf5cfb041782add9ac664181028adafa6aa4945b6cf2f997cb1eeca334a'
AND (
token = 'xtxXhiVbtPmvpyn7t04q6qR/b2wsE+FlSj1bBA/NCiI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)