UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0ONKxQrtHgXLZtk4/vVC1aj7HvOm2qsRvI1+TiUGkaY='
WHERE
key_id = '932388b43217a4035678ca63397146bcb7035bddd0dee621e1e6dab3eef77b81'
AND (
token = '0ONKxQrtHgXLZtk4/vVC1aj7HvOm2qsRvI1+TiUGkaY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)