UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qqPrg9d1+TUNYTJU57AxFKl22lMTzOucO7bqzw/xQXY='
WHERE
key_id = 'ee8e86ecf048fffbd0cf5e8ff386ef5cd865d6dbd83ca9b45d387b2d755d41f6'
AND (
token = 'qqPrg9d1+TUNYTJU57AxFKl22lMTzOucO7bqzw/xQXY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)