UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mCM/aXA6LBi5ui4xflQ+E7dpLxK7Oxmp7ljJdL9BUbY='
WHERE
key_id = 'e3b8943bd0d469b2b9c4a2036a4089d92df5aa61ad0e6ed70207121a26a19831'
AND (
token = 'mCM/aXA6LBi5ui4xflQ+E7dpLxK7Oxmp7ljJdL9BUbY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)