UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3ez5k+C64Hj9ceTyeT+sn8aUyT7Hue/SXj/UKoUQQR8='
WHERE
key_id = '2cbc722c5655299e251c1d976343619286f0faa015c485c9577a8722b3a760b9'
AND (
token = '3ez5k+C64Hj9ceTyeT+sn8aUyT7Hue/SXj/UKoUQQR8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)