UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'spTKHKX3wHV24JOPLpZM9UXGbSG0HQpRp/3GuUMXOUA='
WHERE
key_id = 'a464ff85d70a3bb718f3942d854127940785d6e746bf37e5309da2ecf61a02b8'
AND (
token = 'spTKHKX3wHV24JOPLpZM9UXGbSG0HQpRp/3GuUMXOUA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)