UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 't1HQDl403i21f/Ybo1RpGhq+GGTTX1yTVUua+UdEUTk='
WHERE
key_id = '85fe1f08b10533a4f3a790a125e9911a33cc2a332f902c257c10c2d56360b8e9'
AND (
token = 't1HQDl403i21f/Ybo1RpGhq+GGTTX1yTVUua+UdEUTk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)