UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 't34/N8cFyXfHkDvF1Kmom/VFFMNlcOLQLFQ7ZmXtETs='
WHERE
key_id = 'f92e5a50afac47b4679eec61c8157df6301381bdd2e6dab76f05d211e733ac80'
AND (
token = 't34/N8cFyXfHkDvF1Kmom/VFFMNlcOLQLFQ7ZmXtETs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)